package com.hengshan.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ReturnCode {
    FAIL(999, "失败"),
    SUCCESS(200, "成功"),
    REQUEST_ERROR(400, "请求错误"),
    AUTH_ERROR(401, "认证失败,请重新登录"),
    ACCESS_DENIED(403, "无访问权限"),
    REQUEST_NOT_FOUND(404, "请求资源不存在"),
    SYSTEM_ERROR(500, "服务异常"),
    INVALID_TOKEN(1001, "访问令牌过期或无效"),
    LOGIN_ERROR(1002, "用户名或密码错误"),
    CAPTCHA_EXPIRE(1003, "验证码过期或无效"),
    USERNAME_EXIST(2001, "用户名已存在"),
    PHONE_NUMBER_EXIST(2002, "手机号已存在"),
    EMAIL_EXIST(2003, "邮箱已存在"),
    ROLE_EXIST(2004, "角色名已存在"),
    ROLE_KEY_EXIST(2005, "角色标识符已存在"),
    MENU_EXIST(2006, "菜单名已存在"),
    CATEGORY_EXIST(2007, "类别名已存在"),
    FILE_TYPE_ERROR(3001, "文件类型错误，请上传正确格式的文件");

    private final int code;
    private final String message;

}
